<?php
namespace app\admin\validate;
use think\Validate;

/**
 * 楼层信息验证器
 * Created by PhpStorm.
 * User: tyll
 * Date: 2019/09/18
 * Time: 14:20
 */
class Floor extends Validate{

    protected $rule = [
        'branchid' => 'require',
        'name'     => 'require'
    ];

    protected $message = [
        'branchid.require' => '分部必须填写',
        'name.require'     => '楼层名称必须填写'
    ];

    protected $scene = [
        'add'  => ['branchid','name'],
        'edit' => ['branchid','name']
    ];
}